package com.briup.cms.dao;


import com.briup.cms.bean.Config;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import javax.annotation.Resource;
import java.util.List;

public interface ConfigMapper {
    @Resource
    @Select("select * from cms_config")
    List<Config> SelectAll();

    @Insert("insert into cms_config values(null,#{key},#{val})")
    void insert(Config config);

    @Update("update cms_config set `key`=#{key},val=#{val} where id=#{id}")
    void update(Config config);

    @Delete("delete from cms_config where id=#{id}")
    void deleteById(long id);


}
